const app = new Vue({
    el: '#app',
    // tobaseURL: "http://10.246.29.52:1111/",
    tobaseURL:"http://10.243.49.86:8001/",
    data: {
        kucundata: [],
        kucun_total: 100,
        currentpage: 1,
        pagesize: 10,
    },
    mounted() {
        //自动加载数据
        this.getkucun();
    },
    methods: {
        getkucun: function () {
            var that = this
            axios.get('http://10.243.49.86:8001/api_get/get_kucun').then(
                function (res) {
                    if(res.data.code === 1){
                        //把数据给kucundata
                        that.kucundata = res.data.data;
                        that.$message({
                            message:'数据加载成功',
                            type:'success'
                        })
                    }else{
                        that.$message.error(res.data.msg)
                    }
                }
            ).catch(
                function (err) {
                    console.log(err)
                }
            )
        }
    },
})